<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" CodeFile="ExternalDragDrop.aspx.cs"
    Inherits="Calendar_ExternalDragDrop" Title="External Drag & Drop (Calendar) | DayPilot Pro Demo" %>

<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" 
        DataEndField="end"
        EventMoveJavaScript="if (external) { alert('External drag&drop detected.'); } dpc1.eventMoveCallBack(e, newStart, newEnd, oldColumn, newColumn);"
        ClientObjectName="dpc1" 
        DataStartField="start" 
        DataTextField="name" 
        DataValueField="id" 
        DataAllDayField="allday"
        OnEventMove="DayPilotCalendar1_EventMove" 
        Days="7" 
        EventMoveHandling="JavaScript"

        CssClassPrefix="calendar_silver_"
        HourNameBackColor=""
        BorderColor="#A0A0A0"
        CellBorderColor="#A0A0A0"
        EventBorderColor="#505050"
        AllDayEventBorderColor="#a0a0a0"
        
        >
    </DayPilot:DayPilotCalendar>
    <p>
        Drag items from this list to the calendar:</p>
    <ul style="font-weight: bold;">
        <li><span onmousedown='return DayPilotCalendar.dragStart(this.parentNode, 60*30, "123", this.innerHTML);'
            style="cursor: move;" unselectable='on'>Item #123 (30 minutes)</span></li>
        <li><span onmousedown='return DayPilotCalendar.dragStart(this.parentNode, 60*60, "124", this.innerHTML);'
            style="cursor: move;" unselectable='on'>Item #124 (60 minutes)</span></li>
    </ul>
    
    <div onmousedown='return DayPilotCalendar.dragStart(this, 60*30, "125", this.innerHTML);'
            style="cursor: move;" unselectable='on'><span>Item #125 (30 minutes)</span></div>
</asp:Content>
